﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QlrrPrintService.Common.Command
{
    /// <summary>
    /// 義標籤紙上的相對於原點的參考點座標
    /// 单位dot
    /// </summary>
    public class Reference:PrintLocation,IToTSPLCommand
    {
        #region IToTSPLCommand 成员

        public byte[] ToTSPLCommandByte(int mm_to_dot)
        {
            return Util.GetEncodingBytes(ToTSPLCommandAscii(mm_to_dot));
        }

        public string ToTSPLCommandAscii(int mm_to_dot)
        {
            return string.Format("REFERENCE {0},{1}{2}", _x * mm_to_dot, _y * mm_to_dot, Common.TSPL_END);
        }

        #endregion
    }
}
